package com.hjm.project.finance.agentDeductionsDetails.service.impl;

import com.hjm.common.utils.text.Convert;
import com.hjm.project.finance.agentDeductionsDetails.domain.AgentDeductionsDetails;
import com.hjm.project.finance.agentDeductionsDetails.mapper.AgentDeductionsDetailsMapper;
import com.hjm.project.finance.agentDeductionsDetails.service.IAgentDeductionsDetailsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 扣款终端明细Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-10-21
 */
@Service
public class AgentDeductionsDetailsServiceImpl implements IAgentDeductionsDetailsService {
    @Resource
    private AgentDeductionsDetailsMapper agentDeductionsDetailsMapper;

    /**
     * 查询扣款终端明细
     * 
     * @param id 扣款终端明细ID
     * @return 扣款终端明细
     */
    @Override
    public AgentDeductionsDetails selectAgentDeductionsDetailsById(Integer id) {
        return agentDeductionsDetailsMapper.selectAgentDeductionsDetailsById(id);
    }

    /**
     * 查询扣款终端明细列表
     * 
     * @param agentDeductionsDetails 扣款终端明细
     * @return 扣款终端明细
     */
    @Override
    public List<AgentDeductionsDetails> selectAgentDeductionsDetailsList(AgentDeductionsDetails agentDeductionsDetails) {
        return agentDeductionsDetailsMapper.selectAgentDeductionsDetailsList(agentDeductionsDetails);
    }

    /**
     * 查询扣款终端明细列表
     *
     * @param agentDeductionsDetails 扣款终端明细
     * @return 扣款终端明细 一个结果
     */
    @Override
    public AgentDeductionsDetails selectAgentDeductionsDetailsOne(AgentDeductionsDetails agentDeductionsDetails) {
        return agentDeductionsDetailsMapper.selectAgentDeductionsDetailsOne(agentDeductionsDetails);
    }

    /**
     * 新增扣款终端明细
     * 
     * @param agentDeductionsDetails 扣款终端明细
     * @return 结果
     */
    @Override
    public int insertAgentDeductionsDetails(AgentDeductionsDetails agentDeductionsDetails) {
        return agentDeductionsDetailsMapper.insertAgentDeductionsDetails(agentDeductionsDetails);
    }

    /**
     * 修改扣款终端明细
     * 
     * @param agentDeductionsDetails 扣款终端明细
     * @return 结果
     */
    @Override
    public int updateAgentDeductionsDetails(AgentDeductionsDetails agentDeductionsDetails) {
        return agentDeductionsDetailsMapper.updateAgentDeductionsDetails(agentDeductionsDetails);
    }

    /**
     * 删除扣款终端明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAgentDeductionsDetailsByIds(String ids) {
        return agentDeductionsDetailsMapper.deleteAgentDeductionsDetailsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除扣款终端明细信息
     * 
     * @param id 扣款终端明细ID
     * @return 结果
     */
    @Override
    public int deleteAgentDeductionsDetailsById(Integer id) {
        return agentDeductionsDetailsMapper.deleteAgentDeductionsDetailsById(id);
    }

    /**
     * 删除扣款终端明细信息
     *
     * @param id 扣款终端明细AD_ID
     * @return 结果
     */
    @Override
    public int deleteAgentDeductionsDetailsByAdId(Integer id) {
        return agentDeductionsDetailsMapper.deleteAgentDeductionsDetailsByAdId(id);
    }
}
